LanguageExt.Core

LanguageExt.Core Monads Identity

Contents

record Identity <A> (A Value) Source #

Identity monad

Simply carries the bound value through its bind expressions without imparting any additional behaviours. It can be constructed using:

Identity<int> ma = Id(123);

Parameters

type A

Bound value type

Methods

method Identity<A> Pure (A value) Source #

method K<F, Identity<B>> Traverse <F, B> (Func<A, K<F, B>> f) Source #

where F : Applicative<F>

method Identity<B> Map <B> (Func<A, B> f) Source #

method Identity<B> Select <B> (Func<A, B> f) Source #

method Identity<B> Bind <B> (Func<A, Identity<B>> f) Source #

method Identity<B> Bind <B> (Func<A, K<Identity, B>> f) Source #

method Identity<C> SelectMany <B, C> (Func<A, Identity<B>> bind, Func<A, B, C> project) Source #

method Identity<C> SelectMany <B, C> (Func<A, K<Identity, B>> bind, Func<A, B, C> project) Source #

method int CompareTo (Identity<A>? other) Source #

class IdentityExt Source #

Methods

method Identity<A> As <A> (this K<Identity, A> ma) Source #

class Identity Source #

Identity module

Methods

method K<Identity, A> Pure <A> (A value) Source #

method Identity<B> bind <A, B> (Identity<A> ma, Func<A, Identity<B>> f) Source #

method Identity<B> map <A, B> (Func<A, B> f, Identity<A> ma) Source #

method Identity<B> apply <A, B> (Identity<Func<A, B>> mf, Identity<A> ma) Source #

method Identity<B> action <A, B> (Identity<A> ma, Identity<B> mb) Source #

method S fold <A, S> (Func<A, Func<S, S>> f, S initialState, K<Identity, A> ta) Source #

method S foldBack <A, S> (Func<S, Func<A, S>> f, S initialState, K<Identity, A> ta) Source #

method K<F, K<Identity, B>> traverse <F, A, B> (Func<A, K<F, B>> f, K<Identity, A> ta) Source #

where F : Applicative<F>